package com.github.pig.nideshop.service.impl;

import com.github.pig.nideshop.entity.NideshopTrade;
import com.github.pig.nideshop.entity.NideshopTradeDetail;
import com.github.pig.nideshop.mapper.NideshopTradeDetailMapper;
import com.github.pig.nideshop.mapper.NideshopTradeMapper;
import com.github.pig.nideshop.service.INideshopTradeService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author J神
 * @since 2018-06-23
 */
@Service
public class NideshopTradeServiceImpl extends ServiceImpl<NideshopTradeMapper, NideshopTrade> implements INideshopTradeService {
    @Autowired
    private NideshopTradeMapper nideshopTradeMapper;
    @Autowired
    private NideshopTradeDetailMapper nideshopTradeDetailMapper;
    /**
     * 发起交易
     *
     * @param nideshopTrade
     * @param productIds
     */
    @Override
    public NideshopTrade trade(NideshopTrade nideshopTrade, List<String> productIds) {
        if(StringUtils.equals("充值",nideshopTrade.getTradeType())){

        }
        else if(StringUtils.equals("消费",nideshopTrade.getTradeType())){

        }
        return null;
    }
}
